using System.Collections.Generic;
using System.Globalization;

namespace Wayloop.Fusion.Core.Objects
{
    public class User : FusionObject<int>
    {
        protected string username;
        protected string emailAddress;
        protected string password;
        protected string firstName;
        protected string lastName;
        protected int utcOffset;
        protected CultureInfo culture;
        protected CultureInfo formattingCulture;
        protected IList<Client> clients;
        protected IList<Task> ownedTasks;
        protected IList<Task> assignedTasks;

        public virtual string Username
        {
            get { return username; }
            set { username = value; }
        }

        public virtual string EmailAddress
        {
            get { return emailAddress; }
            set { emailAddress = value; }
        }

        public virtual string Password
        {
            get { return password; }
            set { password = value; }
        }

        public virtual string FirstName
        {
            get { return firstName; }
            set { firstName = value; }
        }

        public virtual string LastName
        {
            get { return lastName; }
            set { lastName = value; }
        }

        public virtual int UtcOffset
        {
            get { return utcOffset; }
            set { utcOffset = value; }
        }

        public virtual CultureInfo Culture
        {
            get { return culture; }
            set { culture = value; }
        }

        public virtual CultureInfo FormattingCulture
        {
            get { return formattingCulture; }
            set { formattingCulture = value; }
        }

        public virtual IList<Client> Clients
        {
            get { return clients; }
            protected set { clients = value; }
        }

        public virtual IList<Task> OwnedTasks
        {
            get { return ownedTasks; }
            protected set { ownedTasks = value; }
        }

        public virtual IList<Task> AssignedTasks
        {
            get { return assignedTasks; }
            protected set { assignedTasks = value; }
        }


        public User()
        {
            clients = new List<Client>();
            ownedTasks = new List<Task>();
            assignedTasks = new List<Task>();
        }


        public override int GetHashCode()
        {
            return GetHashCode(
                Username,
                EmailAddress,
                Password,
                FirstName,
                LastName,
                UtcOffset,
                Culture,
                FormattingCulture);
        }
    }
}